import math

def cositer():
    k = 0
    x = 0.0
    s = 1.0
    while s!=x:
        s = x
        x = math.cos(s)
        print str(abs(x - s))
        k = k + 1
    print x
    print str(k)

cositer()
